/**
 * @file        obs.c
 *
 * @brief       OpenBSD system programming study material
 *
 * @description To study system calls, process, thread, timer, signal, IPC,
 *              etc.
 *
 * @author      Kevin Zhang (kevin.misc.10@gmail.com)
 * @data        2012/12/23
 */

#include "obs.h"
#include "obs_logger.h"
#include "obs_daemon.h"
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <sys/types.h>
#include <sys/resource.h>

static void
set_limit(void)
{
    struct rusage res_usage;

    if (!getrusage(RUSAGE_SELF, &res_usage)) {
    }

    if (!getrusage(RUSAGE_CHILDREN, &res_usage)) {
    }

}

int main(void)
{
    pid_t my_pid;

    my_pid = getpid();
    printf("\n%s(): STARTED, pid %d", __func__, my_pid);

    set_limit();

    obs_logger_init();
    obs_daemon_init();

    test_obs_logger_open_log_file();

    return 0;
}

